home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Extra Heft 12
/
Extra Heft12.bin
/
input64
/
01_86.d64
/
wurfsimulator
(
.txt
)
< prev
Wrap
Commodore BASIC
|
1995-08-17
|
7KB
|
108 lines
900 REM MP $1900-$237F INPUT 64/JOERG HUTH
999 POKE50257,16
2000 DEFFNX(T)=V0*COS(A)*T
2001 DEFFNY(T)=-G/2*T*T+V0*SIN(A)*T+Y0
2002 DEFFNT(T)=V0*SIN(A)/G+SQR((V0*SIN(A)/G)^2+2*Y0/G)
2003 DEFFNM(T)=V0*COS(A)*TF
2004 DEFFNN(T)=(V0*SIN(A))^2/G/2+Y0
2005 POKE53280,5:POKE53281,15:PRINT"[147]"CHR$(14):G=9.81:V0=4:K=(null)/180:A=45*K
2010 TF=FNT(T):XK=1.8:YK=.94
2015 SY=985248
2020 POKE839,1
2500 POKE53280,5:POKE53281,15:PRINT"[147]"CHR$(14)
2510 SYS6430:GOSUB40000:DN$="0123456789+-.E"
3000 REM MODUS : EINGABE (F1)
3003 POKE832,1:POKE53269,3
3005 PRINT"[147] F1:[197]INGABE F3:[194]ERECHNUNG F5:[198]LUGBAHN"
3007 PRINT"----------------------------------------";
3010 PRINT"1:[215]INKEL 2:[199]ESCH. 3:[200]OEHE 4:[203]OORD. 5:[195][204][211]";
3009 PRINT"----------------------------------------[145]";
3015 POKE198,0
3020 GETA$:IFA$>"0"ANDA$<"6"THEN3040
3030 IFA$="[134]"THEN4000
3035 IFA$="[135]"THEN5000
3037 GOTO3020
3040 ONASC(A$)-49GOTO3200,3300,3400,3500
3100 REM EINGABE DES WINKELS (MODUS F1)
3105 PRINT"[147] [197]INGABE DES [193]BSCHUSSWINKELS ([193]LPHA)"
3110 PRINT"---------------------------------------- [193]LTER [215]ERT:";A/K
3120 SYS8320,3,0," [193]LPHA=? ":SYS8352,3,9,11,DN$,X$:X=VAL(X$)
3130 PRINT"[145]";:IFX<0ORX>90THEN3105
3140 A=X*K:GOSUB40020:GOTO3005
3200 REM EINGABE DER ABSCHUSSGESCHWINDIGKEIT (MODUS F1)
3205 PRINT"[147][197]INGABE DER [193]BSCHUSSGESCHWINDIGKEIT (V0)";
3210 PRINT"---------------------------------------- [193]LTER [215]ERT:";V0
3220 SYS8320,3,0," V0=? ":SYS8352,3,6,11,DN$,X$:X=VAL(X$)
3230 PRINT"[145]";:IFX<=0THEN3205
3240 V0=X:GOTO3005
3300 REM EINGABE DER ABSCHUSSHOEHE Y(0) (MODUS F1)
3303 A$=STR$(Y0)
3305 PRINT"[147] [197]INGABE DER [193]BSCHUSSHOEHE ( Y(0) )"
3310 PRINT"----------------------------------------[193]LT:";A$;
3320 PRINTTAB(60)"MAX:"STR$(YK*144/165)
3325 SYS8320,3,0,"Y(0)=? ":SYS8352,3,7,11,DN$,X$:X=VAL(X$)
3330 PRINT"[145]";:IFX>=0ANDX<=YK*144/165THENY0=X:GOSUB40030:GOTO3005
3335 GOTO3305
3400 REM EINGABE DES KOODINATENSYSTEMES XK YK (MODUS F1)
3405 PRINT"[147][197]INGABE DES [203]OORDINATENSYSTEMS (X-[193]CHSE)";
3407 TF=FNT(T):M=FNM(TF):N=FNN(T):X=1.1*M:IFM*164/317<NTHENX=1.1*N*317/164
3410 PRINT"---------------------------------------- Y= 0.5*X "
3413 IFX<=0THENX=1.0E-30
3414 KJ=10^INT(LOG(X)/LOG(10)):X=INT(X/KJ*10+.99999999)*KJ/10
3415 SYS8320,3,0," X=?"X" ":SYS8352,3,5,11,DN$,X$:X=VAL(X$)
3420 PRINT"[145]";:IFX<=0THEN3405
3430 XK=X:YK=X*164/317
3432 IFYK>0THENKJ=10^INT(LOG(YK)/LOG(10)):YK=INT(YK/KJ*10+.99999999)*KJ/10
3435 IFY0*165/144>YKTHENA$="UNDEFINIERT":GOTO3305
3440 GOSUB40030:GOTO3005
3500 SYS6418:GOTO3005
4000 REM MODUS : BERECHNUNG (F3)
4003 POKE832,255:POKE53269,0:SYS6400
4004 TF=FNT(T)
4005 PRINT"[147] F1:[197]INGABE F3:[194]ERECHNUNG F5:[198]LUGBAHN"
4007 PRINT"----------------------------------------"
4008 PRINT"[197]INGABEN:"
4009 PRINT"[163][163][163][163][163][163][163][163][163]"
4010 PRINT"[216]-[193]CHSE: "STR$(XK);"M"
4020 PRINT"[217]-[193]CHSE: "STR$(YK);"M"
4030 PRINT"[193]BSCHUSSWINKEL: "STR$(A/K);" [199]RAD"
4040 PRINT"[193]BSCHUSSGESCHW.:"STR$(V0);"M/S"
4050 PRINT"[193]BSCHUSSHOEHE: "STR$(Y0);"M"
4060 PRINT"----------------------------------------[197]RGEBNISSE:"
4065 PRINT"[163][163][163][163][163][163][163][163][163][163][163][163][163]"
4070 PRINT"[205]AX. [198]LUGHOEHE: "STR$(FNN(T));"M"
4075 UF=FNT(T)
4080 PRINT"[198]LUGWEITE: "STR$(FNM(TF));"M"
4090 PRINT"[198]LUGZEIT: "STR$(TF);"S"
4100 PRINT"- - - - - - - - - - - - - - - - - - - -"
4110 PRINT"X(T)="V0*COS(A)"[157]*T"
4120 PRINT"Y(T)=";-G/2"[157]*T^2+";V0*SIN(A);"[157]*T+"Y0
4125 PRINT"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192] (C) 1986 BY [201][206][208][213][212] 64 (";
4126 PRINT"[202]OERG [200]UTH)"
4130 GETA$:IFA$="[133]"THEN3000
4140 IFA$="[135]"THEN5000
4150 GOTO4130
5000 REM MODUS : FLUGBAHN (F5)
5003 POKE832,1:POKE53269,3
5005 PRINT"[147] F1:[197]INGABE F3:[194]ERECHNUNG F5:[198]LUGBAHN"
5007 PRINT"----------------------------------------";
5010 IFPEEK(839)=0THENPRINT"@:[197]CHTZEIT +/-:VOR/ZURUECK *:[196]RAW ON/OFF";:GOTO5017
5015 PRINT"@:[197]CHTZEIT +/-:VOR/ZURUECK *:[196]RAW ON/OFF";
5017 PRINT" [197]INEN [205]OMENT BITTE ![145][145][145]":PRINT
5030 TF=FNT(T):M=FNM(TF):IFM>XKTHENX=1.1*158:T=1.1*XK*TF/M:GOTO5040
5035 X=M/XK*158:T=TF
5040 POKE842,X:POKE841,(X-PEEK(842))*256:S=SY*T/511
5050 IFS>4.294967E9THENS=256^4-1
5060 P=256^4:FORX=0TO3:P=P/256:POKE846-X,S/P:S=S-PEEK(846-X)*P:NEXT
5200 AB=Y0*164/YK:T0=V0*SIN(A)*164*T/YK/511:T1=-G*164*T*T/2/YK/511/511
5220 POKE847,AB+1:SYS6427,T0,T1
6990 PRINT" [145][145]"
6995 PRINT"X:"STR$(XK)"M"TAB(20)"Y:"STR$(YK)"M";
7000 POKE198,0:SYS6424:IFPEEK(840)=1THEN3000
7010 GOTO4000
9999 END
40000 POKE828,111:SYS6406:SYS6412:GOSUB40020:POKE837,226-(Y0/YK*163)
40010 SYS6421:RETURN
40020 POKE835,A*60/(null):SYS6415:RETURN
40030 POKE837,226-(Y0/YK*163):SYS6421:RETURN